-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test for state_key size #642
base: main
Are you sure you want to change the base?
Conversation
latestEvent := room.Timeline[len(room.Timeline)-1] | ||
|
||
// Sign this bad event which has a too large stateKey | ||
// Synapse always enforced 255 codepoints, but accepts events > 255 bytes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/events/state_keys
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or "events with state keys"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems sane to me.
Part of #531
Dendrite would fail to parse events with e.g. state keys with > 255 bytes. This could break rooms and end in endless loops.
Dendrite PR
Failing test here: https://github.com/matrix-org/complement/actions/runs/5484535830/jobs/9992205068?pr=642#step:8:835
Passing test in Dendrite: https://github.com/matrix-org/dendrite/actions/runs/5484587106/jobs/9992396957#step:7:616